//
//  ViewController.m
//  UI14_AlertView
//
//  Created by 李劲成 on 16/3/28.
//  Copyright © 2016年 ljc. All rights reserved.
//

#import "ViewController.h"
#import "AlertOfLogin.h"
@interface ViewController ()<AlertDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}
#pragma mark - 确定按键.
- (IBAction)handleConfirm:(id)sender {
    
    // 创建 Alert
    AlertOfLogin *alert = [AlertOfLogin alertControllerWithTitle:@"Confirm" message:@"OK" preferredStyle:UIAlertControllerStyleAlert];
    
    alert.delegate = self;
    
    // 模态推出
    [self presentViewController:alert animated:YES completion:^{
       
    }];
}

#pragma mark - 实现协议方法.
-(void)clickConfirmButton:(AlertOfLogin *)alert {
    NSLog(@"ddd");
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
